package factory;

import proxy.ArithmeticProxy;

import java.lang.reflect.Proxy;

public class ArithmeticDaoJdkProxyFactory {
    public static <T> T creat(Object target){
        ArithmeticProxy proxy=new ArithmeticProxy();
        proxy.setArithmeticDao(target);
        return (T) Proxy.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(),proxy);
    }
}
